package com.zhengxin.web;

import java.util.Map;

import org.apache.struts2.interceptor.ApplicationAware;
import org.apache.struts2.interceptor.RequestAware;
import org.apache.struts2.interceptor.SessionAware;

import com.opensymphony.xwork2.ActionSupport;
import com.zhengxin.service.ICustomerService;
import com.zhengxin.service.IDepartmentService;
import com.zhengxin.service.IEmployeeService;
import com.zhengxin.service.ITraceHistoryService;
import com.zhengxin.service.ITransferHistoryService;
/**
 * 1、所有表示域的map在这里接收
 * 2、所有的service都在这里接收IOC容器注入结果
 * @author admin
 *
 */
public class BaseAction extends ActionSupport implements RequestAware,
		SessionAware, ApplicationAware {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	protected Map<String, Object> request; // 保存struts运行时期注入的request保存的map

	protected Map<String, Object> session; // 保存struts运行时期注入的的session保存的map

	protected Map<String, Object> application; // 保存struts运行时期注入的的application保存的map

	// 注入service对象
	protected IDepartmentService departmentService; //部门

	protected IEmployeeService employeeService;  //营销人员
	
	protected ICustomerService customerService;  //客户
	
	protected ITraceHistoryService traceHistoryService;  //客户跟进历史
	
	protected ITransferHistoryService  transferHistoryService;//客户移交记录
	
	
	
	public ITransferHistoryService getTransferHistoryService() {
		return transferHistoryService;
	}

	public void setTransferHistoryService(
			ITransferHistoryService transferHistoryService) {
		this.transferHistoryService = transferHistoryService;
	}

	public ITraceHistoryService getTraceHistoryService() {
		return traceHistoryService;
	}

	public void setTraceHistoryService(ITraceHistoryService traceHistoryService) {
		this.traceHistoryService = traceHistoryService;
	}

	public ICustomerService getCustomerService() {
		return customerService;
	}

	public void setCustomerService(ICustomerService customerService) {
		this.customerService = customerService;
	}

	public IEmployeeService getEmployeeService() {
		return employeeService;
	}

	public void setEmployeeService(IEmployeeService employeeService) {
		this.employeeService = employeeService;
	}

	public IDepartmentService getDepartmentService() {
		return departmentService;
	}

	public void setDepartmentService(IDepartmentService departmentService) {
		this.departmentService = departmentService;
	}

	@Override
	public void setRequest(Map<String, Object> request) {

		this.request = request;
	}

	@Override
	public void setSession(Map<String, Object> session) {

		this.session = session;
	}

	@Override
	public void setApplication(Map<String, Object> application) {

		this.application = application;
	}
}
